package com.surfmanager.model;
// Generated Aug 10, 2014 1:22:13 PM by Hibernate Tools 3.6.0


import com.google.gson.annotations.Expose;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

@Entity
@Table(name="trip")
public class Trip  implements java.io.Serializable, Comparable {


    @Id
    @Column(name="trip_id")
    @GeneratedValue	
     private Integer tripId;
    
    @Column(name="departDate")
    @Temporal(javax.persistence.TemporalType.DATE)
    @Expose(serialize = false)
     private Date departDate;
    
    @Column(name="retourDate")
    @Temporal(javax.persistence.TemporalType.DATE)
    @Expose(serialize = false)
     private Date retourDate;
    
    @Column(name="departPlace")
     private String departPlace;
    
    @Column(name="tripPlace")
     private String tripPlace;
    
    @Column(name="tripDuration")
     private String tripDuration;
    
    @Column(name="tripProbability")
    private double tripProbability;
     
    @Column(name="maxParticipants")
    private int maxParticipants;
    
       @Column(name="pricePerParticipant")
     private double pricePerParticipant;
     
     @Column(name="transport")
     private String transport;
     
     @Column(name="description")
     private String description;
     
     @ManyToOne
    @JoinColumn(name="profile_id")
    private Profile profile;

    public Trip() {
    }

    public Trip(Date departDate, Date retourDate, String departPlace, String tripPlace, String tripDuration, double tripProbability, int maxParticipants, double pricePerParticipant, String transport, String description) {
        this.departDate = departDate;
        this.retourDate = retourDate;
        this.departPlace = departPlace;
        this.tripPlace = tripPlace;
        this.tripDuration = tripDuration;
        this.tripProbability = tripProbability;
        this.maxParticipants = maxParticipants;
        this.pricePerParticipant = pricePerParticipant;
        this.transport = transport;
        this.description = description;
        
    }

    public Integer getTripId() {
        return tripId;
    }

    public void setTripId(Integer tripId) {
        this.tripId = tripId;
    }

    public Date getDepartDate() {
        return departDate;
    }

    public void setDepartDate(Date departDate) {
        this.departDate = departDate;
    }

    public Date getRetourDate() {
        return retourDate;
    }

    public void setRetourDate(Date retourDate) {
        this.retourDate = retourDate;
    }

    public String getDepartPlace() {
        return departPlace;
    }

    public void setDepartPlace(String departPlace) {
        this.departPlace = departPlace;
    }

    public String getTripPlace() {
        return tripPlace;
    }

    public void setTripPlace(String tripPlace) {
        this.tripPlace = tripPlace;
    }

    public String getTripDuration() {
        return tripDuration;
    }

    public void setTripDuration(String tripDuration) {
        this.tripDuration = tripDuration;
    }

    public double getTripProbability() {
        return tripProbability;
    }

    public void setTripProbability(double tripProbability) {
        this.tripProbability = tripProbability;
    }

    public int getMaxParticipants() {
        return maxParticipants;
    }

    public void setMaxParticipants(int maxParticipants) {
        this.maxParticipants = maxParticipants;
    }

    public double getPricePerParticipant() {
        return pricePerParticipant;
    }

    public void setPricePerParticipant(double pricePerParticipant) {
        this.pricePerParticipant = pricePerParticipant;
    }

    public String getTransport() {
        return transport;
    }

    public void setTransport(String transport) {
        this.transport = transport;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }

    @Override
    public String toString() {
        return "Trip{" + "tripId=" + tripId + ", departDate=" + departDate + ", retourDate=" + retourDate + ", departPlace=" + departPlace + ", tripPlace=" + tripPlace + ", tripDuration=" + tripDuration + ", tripProbability=" + tripProbability + ", maxParticipants=" + maxParticipants + ", pricePerParticipant=" + pricePerParticipant + ", transport=" + transport + ", description=" + description + ", profile=" + '}';
    }

   

    @Override
    public int compareTo(Object o) {
       return this.getTripId().compareTo(((Trip)o).getTripId());
    }
  
    



}


